<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core">

    <ui:composition template="/template.xhtml">
        <ui:define name="title">
            <h:outputText value="#{bundle.CreateUserTitle}"></h:outputText>
        </ui:define>
        <ui:define name="body">
            <h:panelGroup id="messagePanel" layout="block">
                <h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
            </h:panelGroup>
            <h:form>
                <h:panelGrid columns="2">
                    <h:outputLabel value="#{bundle.CreateUserLabel_id}" for="id" />
                    <h:inputText id="id" value="#{userController.selected.id}" title="#{bundle.CreateUserTitle_id}" required="true" requiredMessage="#{bundle.CreateUserRequiredMessage_id}"/>
                    <h:outputLabel value="#{bundle.CreateUserLabel_userName}" for="userName" />
                    <h:inputText id="userName" value="#{userController.selected.userName}" title="#{bundle.CreateUserTitle_userName}" required="true" requiredMessage="#{bundle.CreateUserRequiredMessage_userName}"/>
                    <h:outputLabel value="#{bundle.CreateUserLabel_password}" for="password" />
                    <h:inputText id="password" value="#{userController.selected.password}" title="#{bundle.CreateUserTitle_password}" required="true" requiredMessage="#{bundle.CreateUserRequiredMessage_password}"/>
                    <h:outputLabel value="#{bundle.CreateUserLabel_fullName}" for="fullName" />
                    <h:inputText id="fullName" value="#{userController.selected.fullName}" title="#{bundle.CreateUserTitle_fullName}" required="true" requiredMessage="#{bundle.CreateUserRequiredMessage_fullName}"/>
                    <h:outputLabel value="#{bundle.CreateUserLabel_email}" for="email" />
                    <h:inputText id="email" value="#{userController.selected.email}" title="#{bundle.CreateUserTitle_email}" required="true" requiredMessage="#{bundle.CreateUserRequiredMessage_email}"/>
                    <h:outputLabel value="#{bundle.CreateUserLabel_phone}" for="phone" />
                    <h:inputText id="phone" value="#{userController.selected.phone}" title="#{bundle.CreateUserTitle_phone}" required="true" requiredMessage="#{bundle.CreateUserRequiredMessage_phone}"/>
                    <h:outputLabel value="#{bundle.CreateUserLabel_mobile}" for="mobile" />
                    <h:inputText id="mobile" value="#{userController.selected.mobile}" title="#{bundle.CreateUserTitle_mobile}" required="true" requiredMessage="#{bundle.CreateUserRequiredMessage_mobile}"/>
                    <h:outputLabel value="#{bundle.CreateUserLabel_createdAt}" for="createdAt" />
                    <h:inputText id="createdAt" value="#{userController.selected.createdAt}" title="#{bundle.CreateUserTitle_createdAt}" required="true" requiredMessage="#{bundle.CreateUserRequiredMessage_createdAt}">
                        <f:convertDateTime pattern="MM/dd/yyyy" />
                    </h:inputText>
                    <h:outputLabel value="#{bundle.CreateUserLabel_salt}" for="salt" />
                    <h:inputText id="salt" value="#{userController.selected.salt}" title="#{bundle.CreateUserTitle_salt}" required="true" requiredMessage="#{bundle.CreateUserRequiredMessage_salt}"/>
                </h:panelGrid>
                <br />
                <h:commandLink action="#{userController.create}" value="#{bundle.CreateUserSaveLink}" />
                <br />
                <br />
                <h:commandLink action="#{userController.prepareList}" value="#{bundle.CreateUserShowAllLink}" immediate="true"/>
                <br />
                <br />
                <h:commandLink value="#{bundle.CreateUserIndexLink}" action="/index" immediate="true" />
            </h:form>
        </ui:define>
    </ui:composition>

</html>
